package com.eight.statistics.controller;

import com.eight.common.vo.Result;
import com.eight.statistics.pojo.MemberType;
import com.eight.statistics.service.MemberService;
import com.eight.statistics.vo.ChartTimeVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @program: qy8-education
 * @description:
 * @author: 郑友民（1460115388@qq.com）
 * @create: 2023-05-28 17:22
 **/

@RestController
@RequestMapping("/stat/member")
@Api(tags = "统计会员接口类")
public class MemberController {
    @Autowired
    private MemberService memberService;

    @PostMapping("queryMemberTypeBang")
    @ApiOperation("时间条件查询获取到用户类型")
    public Result queryMemberTypeBang(@RequestBody ChartTimeVo chartTimeVo) {
        List<MemberType> memberTypes = memberService.queryMemberTypeBang(chartTimeVo);
        return Result.success(memberTypes);
    }
}

